#pragma once
#include "BindingHeader.hpp"

void Bind_Combobox(lua_State* l)
{
	using namespace luabind;
	using namespace CEGUI;

	module(l,"Cegui")
		[
			class_<ComboDropList>("ComboDropList")			
			,
			class_<Combobox,Window>("Combobox")
			.def("isHit",&Combobox::isHit)
			.property("SingleClickEnabled",&Combobox::getSingleClickEnabled,&Combobox::setSingleClickEnabled)
			.property("DropDownListVisible",&Combobox::isDropDownListVisible)
			.property("Editbox",&Combobox::getEditbox)
			.property("PushButton",&Combobox::getPushButton)
			.property("DropList",&Combobox::getDropList)
			.property("HasInputFocus",&Combobox::hasInputFocus)
			.property("ReadOnly",&Combobox::isReadOnly,&Combobox::setReadOnly)
			.property("TextValid",&Combobox::isTextValid)
			.property("ValidationString",&Combobox::getValidationString,&Combobox::setValidationString)
			.property("CaratIndex",&Combobox::getCaratIndex,&Combobox::setCaratIndex)
			.property("SelectionStartIndex",&Combobox::getSelectionStartIndex)
			.property("SelectionEndIndex",&Combobox::getSelectionEndIndex)
			.property("SelectionLength",&Combobox::getSelectionLength)
			.property("MaxTextLength",&Combobox::getMaxTextLength,&Combobox::setMaxTextLength)
			.property("ItemCount",&Combobox::getItemCount)
			.property("SelectedItem",&Combobox::getSelectedItem)
			.def("getListBoxItemFromIndex",&Combobox::getListboxItemFromIndex)
			.def("getItemIndex",&Combobox::getItemIndex)
			.property("SortEnabled",&Combobox::isSortEnabled,&Combobox::setSortingEnabled)
			.def("isItemSelected",&Combobox::isItemSelected)
			.def("findItemWithText",&Combobox::findItemWithText)
			.def("isListboxItemInList",&Combobox::isListboxItemInList)
			.property("VertScrollbarAlwaysShown",&Combobox::isVertScrollbarAlwaysShown,&Combobox::setShowVertScrollbar)
			.property("HorzScrollbarAlwaysShown",&Combobox::isHorzScrollbarAlwaysShown,&Combobox::setShowHorzScrollbar)
			.def("initialiseComponents",&Combobox::initialiseComponents)
			.def("showDropList",&Combobox::showDropList)
			.def("hideDropList",&Combobox::hideDropList)
			.def("setSelection",&Combobox::setSelection)
			.def("activateEditbox",&Combobox::activateEditbox)
			.def("resetList",&Combobox::resetList)
			.def("addItem",&Combobox::addItem)
			.def("insertItem",&Combobox::insertItem)
			.def("removeItem",&Combobox::removeItem)
			.def("clearAllSelections",&Combobox::clearAllSelections)
			.def("setItemSelectState",(void(Combobox::*)(ListboxItem*,bool))&Combobox::setItemSelectState)
			.def("setItemSelectState",(void(Combobox::*)(size_t,bool))&Combobox::setItemSelectState)
			.def("handleUpdatedListItemData",&Combobox::handleUpdatedListItemData)
			.CASTER(Window,Combobox)
		];
}